package cn.comtom.ewbs.signature.entity;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
 
/**
 * <p>
 * 
 * </p>
 *
 * @author liuhy
 * @since 2022-11-04 14:27:32
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "")
public class SysUser extends Model<SysUser> {
 
    private static final long serialVersionUID = 1L;
 
    @ApiModelProperty("主键")
    @TableId("id")
    private String id;
 
    @ApiModelProperty("登录账号")
    @TableField("account")
    private String account;
 
    @ApiModelProperty("登录密码")
    @TableField("password")
    private String password;
    
    @ApiModelProperty("token")
    @TableField(exist = false)
    private String token;
 
    @ApiModelProperty("密码输入错误次数(初期为0，登录成功后变为0，密码输入错误后累计，累计5次，该用户将被锁定，密码重置或用户解锁后，变为0)")
    @TableField("pwd_err_num")
    private Integer pwdErrNum;
 
    @ApiModelProperty("盐")
    @TableField("salt")
    private String salt;
 
    @ApiModelProperty("用户名")
    @TableField("user_name")
    private String userName;
 
    @ApiModelProperty("用户头像")
    @TableField("user_picture")
    private String userPicture;
 
    @ApiModelProperty("生日")
    @TableField("birthday")
    private LocalDate birthday;
 
    @ApiModelProperty("性别(1:男.2:女)")
    @TableField("sex")
    private Boolean sex;
 
    @ApiModelProperty("手机号")
    @TableField("mobile_phone")
    private String mobilePhone;
 
    @ApiModelProperty("邮箱")
    @TableField("mailbox")
    private String mailbox;
 
    @ApiModelProperty("用户状态(0-正常,1-冻结)")
    @TableField("user_status")
    private Integer userStatus;
 
    @ApiModelProperty("创建人")
    @TableField("creator")
    private String creator;
 
    @ApiModelProperty("创建日期")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
 
    @ApiModelProperty("更新人")
    @TableField("updater")
    private String updater;
 
    @ApiModelProperty("更新日期")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
 
    @ApiModelProperty("最近登录时间")
    @TableField("last_login_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastLoginTime;
 
 
    @Override
    public Serializable pkVal() {
        return this.id;
    }
 
}